import { MerchantOrg } from './merchantOrg.js';


export class MerchantCandidateMgr {
    constructor() {
        // 默认构造函数
        this.dataList = [];
    }

    // 模拟 Dart 的 fromJson 构造函数
    static fromJson(jsonArray) {
        const instance = new MerchantCandidateMgr();
        for (const element of jsonArray) {
            instance.dataList.push(MerchantOrg.fromJson(element));
        }
        return instance;
    }

    /*
    // 可选的测试数据初始化方法（模拟 Dart 注释中 test 初始化）
    static initTestData() {
      const instance = new MerchantCandidateMgr();
      instance.dataList.push(MerchantOrg.initForTest('二号店'));
      instance.dataList.push(MerchantOrg.initForTest('3号店'));
      instance.dataList.push(MerchantOrg.initForTest('4号店'));
      instance.dataList.push(MerchantOrg.initForTest('5号店'));
      instance.dataList.push(MerchantOrg.initForTest('6号店'));
      instance.dataList.push(MerchantOrg.initForTest('7号店'));
      instance.dataList.push(MerchantOrg.initForTest('8号店'));
      instance.dataList.push(MerchantOrg.initForTest('9号店'));
      instance.dataList.push(MerchantOrg.initForTest('10号店'));
      instance.dataList.push(MerchantOrg.initForTest('11号店'));
      instance.dataList.push(MerchantOrg.initForTest('12号店'));
      return instance;
    }
    */
}
